<?php
namespace backend\models;
use yii\db\ActiveRecord;
/**
 * Created by PhpStorm.
 * User: 张
 * Date: 2015/9/23
 * Time: 21:33
 */
class Productct extends ActiveRecord{
    public static function tableName()
    {
        return '{{%product_category}}';
    }
    public function rules(){
        return[
            [['name','parent_cid'],'required','on'=>'add'],
            [['name','cid'],'required','on'=>'update'],
        ];
    }
}
?>
